package me.sdevil507.org.po;


import lombok.Data;
import me.sdevil507.platform.po.PlatResourcePo;
import me.sdevil507.supports.jpa.BaseJpaSnowflakeIdEntity;

import javax.persistence.*;

/**
 * 机构角色资源映射表[PlatRoleResourceRelPo]
 *
 */
@Entity
@Table(name = "biz_org_role_res_rel")
@Data
public class OrgRoleResourceRelPo extends BaseJpaSnowflakeIdEntity {

    /**
     * 是否显示
     */
    @Column
    private Boolean moduleShow;

    /**
     * 是否可操作
     */
    @Column
    private Boolean moduleAuth;

    /**
     * 包含角色
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "role_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private OrgRolePo role;

    /**
     * 包含资源d
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "res_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private PlatResourcePo resource;

}